package cn.edu.sdwu.day03.controller;

import cn.edu.sdwu.day03.entity.Application;
import cn.edu.sdwu.day03.service.ApplicationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ApplicationController {
    @Autowired
    ApplicationService applicationService;

    @RequestMapping(value = "/application", method = {RequestMethod.GET})
    public List<Application> selectList(){
        return applicationService.selectList();
    }
    @RequestMapping(value = "/applicationOne", method = {RequestMethod.GET})
    public Application selectApplication()
    {
        return applicationService.selectApplication();
    }
}
